/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.ipccenter.toster.jpa;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigInteger;

/**
 *
 * @author 7
 */
@Entity @IdClass(TestId.class)
@Table(name = "Users_Tests")
public class JPAUserTest implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "session_id")
    private BigInteger session_id;
    
    @Id
    @Column(name = "tc_id")
    private BigInteger tc_id;
    
    @Column(name = "ans_num")
    private Short ansnum;
    
    @Lob
    @Column(name = "ANS_CONTENT")
    private String ansContent;
    
    @Column(name = "mark")
    private Short mark;

    public BigInteger getId() {
        return session_id;
    }

    public void setId(BigInteger id) {
        this.session_id = id;
    }

    public Short getAnsNum() {
        return ansnum;
    }

    public Short getMark() {
        return mark;
    }

    public BigInteger getTc_id() {
        return tc_id;
    }

    public void setAnsNum(Short answer_id) {
        this.ansnum = answer_id;
    }

    public void setMark(Short mark) {
        this.mark = mark;
    }

    public void setTc_id(BigInteger tc_id) {
        this.tc_id = tc_id;
    }

    public String getAnsContent() {
        return ansContent;
    }

    public void setAnsContent(String ansContent) {
        this.ansContent = ansContent;
    }
    
    
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (session_id != null ? session_id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof JPAUserTest)) {
            return false;
        }
        JPAUserTest other = (JPAUserTest) object;
        if ((this.session_id == null && other.session_id != null) || (this.session_id != null && !this.session_id.equals(other.session_id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.ipccenter.toster.jpa.JPATest[ id=" + session_id + " ]";
    }
    
}
